package com.seal.tsms.other.entity;

import java.io.Serializable;

/**
 * Created by seal on 2016/3/20.
 */
public class VotePk implements Serializable {
    private Subject subject;
    private Token token;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VotePk votePk = (VotePk) o;

        if (subject != null ? !subject.equals(votePk.subject) : votePk.subject != null) return false;
        return !(token != null ? !token.equals(votePk.token) : votePk.token != null);

    }

    @Override
    public int hashCode() {
        int result = subject != null ? subject.hashCode() : 0;
        result = 31 * result + (token != null ? token.hashCode() : 0);
        return result;
    }

    public Subject getSubject() {
        return subject;
    }

    public void setSubject(Subject subject) {
        this.subject = subject;
    }

    public Token getToken() {
        return token;
    }

    public void setToken(Token token) {
        this.token = token;
    }
}
